package com.justgame.project.service.just;

import com.justgame.project.cloud.common.constant.AppConstant;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.session.FlushMode;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * @author ZhouWeiBo
 * @create 2022/4/19
 */
@EnableAsync
@ComponentScan("com")
@ServletComponentScan("com")
@SpringBootApplication
@EnableEurekaClient
@EnableCaching
@EnableRedisHttpSession(flushMode = FlushMode.IMMEDIATE)
@EnableFeignClients({"com.justgame"})
public class JustApplication {
    public static void main(String[] args) {
        System.setProperty(AppConstant.EUREKA_INSTANCEID_PROPERTY,AppConstant.JUST);
        System.setProperty(AppConstant.APPLICATION_PROPERTY,AppConstant.JUST);
        SpringApplication.run(JustApplication.class,args);
    }
}
